
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
 */
package Func;

//~--- JDK imports ------------------------------------------------------------

import java.sql.Connection;
import java.sql.DriverManager;

import javax.swing.JOptionPane;

/**
 *
 * @author URUKU
 */
public class Conn {
    public static Connection GetCon() {
        Connection con = null;

        try {

        Class.forName("com.mysql.jdbc.Driver");
            // DriverManager.registerDriver(new SQLServerDriver());

            con = DriverManager.getConnection("jdbc:mysql://localhost/trangsuc","root","root");
           
        } catch (Exception e) {
            JOptionPane.showMessageDialog(null, "" + e.getMessage());
        } finally {
            return con;
        }
    }
}



//~ Formatted by Jindent --- http://www.jindent.com
